<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title><?php echo C("SITE_NAME");?>管理后台</title>
<link rel="shortcut icon" href=" /favicon.ico" />
<link rel="stylesheet" href="/Static/admin/css/component-min.css">
<link rel="stylesheet" href="/Static/admin/css/home.2015.05.22-09.32.css">
<link rel="stylesheet" href="/Static/admin/icon/iconfont.css">
<!--弹窗-->
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script src="/Static/admin/js/layer-2.x/layer.js?v=1.9.0"></script>
<script src="/Static/admin/js/common.js"></script>
<script>
	var UPYUN_DOMAIN = '<?php echo C("UPYUN_DOMAIN");?>';
</script>
</head>
<body class="cp-bodybox">
<!--[if lt IE 9]>
<div class="alert alert-danger disable-del txtCenter" id="tipLowIEVer">
    <h4>系统检测到您使用的浏览器版本过低，为达到更好的体验效果请升级您的浏览器，我们为您推荐：</h4>
    <p>
        <a href="http://www.firefox.com.cn/download/" target="_blank">Firefox浏览器</a>
        <a href="http://www.maxthon.cn/" target="_blank">遨游浏览器</a>
        <a href="http://se.360.cn/" target="_blank">360浏览器</a>
    </p>
</div>
<![endif]-->
<style>
.header-nav-list a {
  display: block;
  padding: 0 10px;
  min-width: 70px;
  line-height: 53px;
  font-size: 14px;
  text-align: center;
  font-weight: 700;
}
</style>

<div class="header">
    <div class="inner clearfix">
        <div class="fl">
            <a href="/" class="header-logo">
                <img
                    src="<?php echo C('UPYUN_DOMAIN'); echo C('SITE_TOPLOGO2');?>"
                    onerror="javascript:this.src='/Static/admin/images/error.png';"
                    ></a>
        </div>
        <!-- end logo -->

        <div class="header-nav fl">
            <ul class="header-nav-list clearfix">
                <!--<li class="fl <?php echo ($controller == 'index')?'active':'';?>"><a href="/admin">首页</a></li>-->
                <?php foreach($MENU as $k=>$v){?>
                <li class="fl <?php echo ($controller == $v['controller'])?'active':'';?>">
                    <a href="<?php echo $v['url'];?>"><?php echo $v['title'];?></a>
                </li>
                <?php } ?>
            </ul>
        </div>
        <!-- end header-nav -->

        <div class="fr">
            <ul class="header-ctrl clearfix">
                <li class="header-ctrl-item fl"><a href="/admin/login/logout">退出</a></li>
            </ul>
        </div>

        <span class="account_inbox_switch fr"></span>
        <span class="header-welcome fr">
            <a href="javasecript:;" class="tips" data-trigger="hover" data-placement="top"><?php echo $admininfo['username'];?></a>
        </span>

    </div>
</div>
<!-- end header -->
	<div class="container">
		<div class="inner clearfix">
			
			<div class="content-left fl">
				<dl class="left-menu shop_8">
					<dt>
						<i class="icon-menu home"></i> <span id="shop_0" data-id="0">管理员管理</span>
					</dt>
					<dd class="<?php echo ($action == 'index')?'active':'';?>">
						<a href="/admin/manager/index">管理员列表</a>
					</dd>

					<dd class="<?php echo ($action == 'addmanager')?'active':'';?>">
						<a href="/admin/manager/addmanager">添加用户</a>
					</dd>

				</dl>
<!-- 
				<dl class="left-menu shop_8">
					<dt>
						<i class="icon-menu pencil"></i> <span id="shop_1" data-id="1">用户角色</span>
					</dt>
					<dd class="<?php echo ($action == 'rolelist')?'active':'';?>">
						<a href="/admin/manager/rolelist">角色列表</a>
					</dd>
					<dd class="<?php echo ($action == 'addrole')?'active':'';?>">
						<a href="/admin/manager/addrole">添加角色</a>
					</dd>
				</dl>
				
-->	
				<dl class="left-menu shop_8">
					<dt>
						<i class="icon-menu pencil"></i> <span id="shop_1" data-id="1">修改密码</span>
					</dt>
					<dd class="<?php echo ($action == 'changepassword')?'active':'';?>">
						<a href="/admin/manager/changepassword">修改密码</a>
					</dd>
				</dl>

			</div>
<div class="content-right fl">

	<table class="wxtables mgt10">
		<colgroup>
			<col width="5%">
			<col width="9%">
			<col width="9%">
			<col width="9%">
			<col width="9%">
			<col width="9%">
			<col width="9%">
			<col width="10%">
			<col width="10%">
			<col width="17%">
		</colgroup>
		<thead>

			<tr class="po_list">
				<td>编号<span></span></td>
				
				<td>用户名<span></span></td>
				<td>商城用户ID<span></span></td>
				<td>头像<span></span></td>
				<td>昵称<span></span></td>

				<td>用户角色<span></span></td>
				<td>登录次数<span></span></td>
				<td>最近登录<span></span></td>
				<td>最近IP<span></span></td>
			  <td>操作<span></span></td>
			</tr>
		</thead>
		<tbody>
		<?php foreach($datalist as $k=>$v){?>
			<tr>
				<td><?php echo $v['adminuid'];?></td>
				<td><?php echo $v['username'];?></td>
				<td><?php echo $v['uid'];?></td>
				
				<td><img src="<?php echo $v['headimgurl'];?>" width="60"></td>
				<td><?php echo emoji_unified_to_html($v['nickname']);?></td>
				
				<td><?php echo $v['role_name'];?></td>
				<td><?php echo $v['login_nums'];?></td>
				<td><?php echo $v['login_time'];?></td>
				<td><?php echo $v['login_ip'];?></td>
				<!--  <td><?php echo $v['status']==1 ? "正常":"禁用";?></td>-->
			  <td>
			  
			  	<?php if(($v['adminuid'] == 1) && ($admininfo['adminuid']!=1)){ ?>

			  	<?php }else{ ?>
			  		<a href="/admin/manager/addmanager/?id=<?php echo $v['adminuid'];?>" class="btn width" title="修改">编辑</a>
			  	<?php } ?>
			  
				<?php if($v['adminuid'] != 1){ ?>
					<a href="javascript:del(<?php echo $v['adminuid'];?>);" class="btn j-del" title="删除" data-id="2416530">删除</a>
				<?php } ?>
			</tr>
		<?php } ?>
		</tbody>
	</table>
</div>
<script>
function del(id){

	//询问框
	layer.confirm('你确定要删除吗？', {
	    btn: ['确定','我再想想'] //按钮
	}, function(){
		var url = "/admin/manager/del/?id="+id;
		AjaxUrl(url);
	}, function(){


	});
	
	
	
}

</script>
		</div>
	</div>
<!--gonggao-->
<div class="footer">&copy; <?php echo date("Y");?> <?php echo C("SITE_NAME");?> , Inc. All rights reserved.</div>
<a href="#" id="j-gotop" class="gotop" title="回到顶部" style="right:45px; display: inline;"></a>
<script type="text/javascript">
$(function(){
    var height1=$(".content-right").height();
    var height2=$(".content-left").height();
    if(parseInt(height1) < parseInt(height2)){
        $(".content-right").css({'min-height': height2});
    }
    $(window).scroll(function() {
		$(this).scrollTop() >= 150 ? $("#j-gotop").fadeIn(300) : $("#j-gotop").fadeOut(300)
	});
});
</script>
</body>
</html>